<?php
	require_once ("db_connection.php");

	$result = mysql_query("SELECT * FROM city WHERE cityname LIKE '%". mysql_real_escape_string($_GET['term'])."%'", $con);
	

	$data = array();
	while( $row = mysql_fetch_array($result, MYSQL_ASSOC) ){
		$tempcountry = $row['countryid'] ;
	
		$data[] = array(
			'label' => $row['cityname'] ,
			'value' => $row['cityname'],
			'zipcodes' => $row['zipcode'],
			'id' => $row['cityid']
				
			
		);
	}
	

	mysql_close($con);
	
	echo json_encode($data);
	flush();
?>